package day8;

/**
 * @author oldliu
 * @since 1.0
 */
//地主
public class Lord {
    public static void main(String[] args) throws InterruptedException {
        Thread main = Thread.currentThread();
        main.setName("周扒皮");
        Worker w=new Worker("小王");
        Worker w2=new Worker("老吴");
        w.start();
        w2.start();
        while (true){
            System.out.println(main.getName()+"睡一会");
            Thread.sleep(2000);
            System.out.println(main.getName()+"睡醒了，喊工人干活");
            w.interrupt();//吵醒
            w2.interrupt();
        }
    }
}
